package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.YgemployeeMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YgEmployeeMapper;
import com.ruoyi.system.domain.YgEmployee;
import com.ruoyi.system.service.IYgEmployeeService;

/**
 * 员工Service业务层处理
 * 
 * @author 你虎啊
 * @date 2022-11-25
 */
@Service
public class YgEmployeeServiceImpl implements IYgEmployeeService 
{
    @Autowired
    private YgEmployeeMapper ygEmployeeMapper;

    /**
     * 查询员工
     * 
     * @param empid 员工主键
     * @return 员工
     */
    @Override
    public YgEmployee selectYgEmployeeByEmpid(Long empid)
    {
        return ygEmployeeMapper.selectYgEmployeeByEmpid(empid);
    }

    /**
     * 查询员工
     *
     * @param YgemployeeMap 员工
     * @return 员工
     */
    @Override
    public List<YgemployeeMap> selectYgEmployeeListt(YgemployeeMap YgemployeeMap) {
        return ygEmployeeMapper.selectYgEmployeeListtt(YgemployeeMap);
    }

    /**
     * 查询员工列表
     * 
     * @param ygEmployee 员工
     * @return 员工
     */
    @Override
    public List<YgEmployee> selectYgEmployeeList(YgEmployee ygEmployee)
    {
        return ygEmployeeMapper.selectYgEmployeeList(ygEmployee);
    }

    /**
     * 新增员工
     * 
     * @param ygEmployee 员工
     * @return 结果
     */
    @Override
    public int insertYgEmployee(YgEmployee ygEmployee)
    {
        return ygEmployeeMapper.insertYgEmployee(ygEmployee);
    }

    /**
     * 修改员工
     * 
     * @param ygEmployee 员工
     * @return 结果
     */
    @Override
    public int updateYgEmployee(YgEmployee ygEmployee)
    {
        return ygEmployeeMapper.updateYgEmployee(ygEmployee);
    }

    /**
     * 批量删除员工
     * 
     * @param empids 需要删除的员工主键
     * @return 结果
     */
    @Override
    public int deleteYgEmployeeByEmpids(Long[] empids)
    {
        return ygEmployeeMapper.deleteYgEmployeeByEmpids(empids);
    }

    /**
     * 删除员工信息
     * 
     * @param empid 员工主键
     * @return 结果
     */
    @Override
    public int deleteYgEmployeeByEmpid(Long empid)
    {
        return ygEmployeeMapper.deleteYgEmployeeByEmpid(empid);
    }
}
